OK Button:
Saves the current settings and closes the dialog.